# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=metasploit-autopwn
pkgver=12.09320cc
pkgrel=1
groups=('blackarch' 'blackarch-automation' 'blackarch-exploitation')
arch=('any')
pkgdesc='db_autopwn plugin of metasploit.'
url='https://github.com/hahwul/metasploit-autopwn'
license=('custom:unknown')
depends=('metasploit')
makedepends=('git')
source=("git+https://github.com/hahwul/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 644 db_autopwn.rb "$pkgdir/opt/metasploit/plugins/db_autopwn.rb"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

